package han.service;

import org.springframework.stereotype.Service;
import han.pojo.Question;
import han.dao.QuestionMapper;

import java.util.List;

/**
 * @authou HanDianWei
 * @create 2020-10-27 18:26
 */
@Service
public class QuestionServiceImpl implements QuestionService{

    private QuestionMapper questionMapper;
    public void setQuestionMapper(QuestionMapper questionMapper){
        this.questionMapper=questionMapper;
    }

    public int deleteByPrimaryKey(int q_id) {
        return questionMapper.deleteByPrimaryKey(q_id);
    }


    public int insert(Question question) {
        return questionMapper.insert(question);
    }

    public Question selectByPrimaryKey(int q_id) {
        return questionMapper.selectByPrimaryKey(q_id);
    }

    public List<Question> queryQuestion() {
        return questionMapper.queryQuestion();
    }


    public int updateByPrimaryKey(Question question) {
        return questionMapper.updateByPrimaryKey(question);
    }

}

